package com.zhou.project.modules.circle.circleType.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zhou.project.components.base.entity.Base;
import com.zhou.project.modules.circle.circleGroup.entity.CircleGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.util.List;


@Getter
@Setter
@TableName(value = "ucc_circle",resultMap = "circleTypeMapper")
@ApiModel("[圈子模块-圈子类型-数据模块]")
public class CircleType extends Base {


    @NotBlank(message = "圈子名称不可以为空")
    @Length(min=2,max = 15,message = "圈子名称的长度应为{min}-{max}之间")
    @ApiModelProperty(name = "name",value = "圈子名称",required = true,dataType = "String")
    private String name ;

    @TableField(exist = false)
    @ApiModelProperty(name = "groupList",value = "圈子集合",required = false,dataType = "List<CircleGroup>")
    private List<CircleGroup> groupList;
}
